From c0ec5cedd8da44f587f36f9160cce533e7b6d10a Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Tue, 16 May 2006 12:34:01 +0000 Subject: [PATCH] put the newly selected row(s) the in the middle of the view, 2006-05-16 Kristian Rietveld * gtk/gtkfilechooserdefault.c (show_and_select_paths_finished_loading): put the newly selected row(s) the in the middle of the view, (update_current_folder_get_info_cb), (gtk_file_chooser_default_update_current_folder): make sure reload state is set to RELOAD_HAS_FOLDER while loading the new folder, so _map() won't start loading the current working directory. (Fixes #341028, reported by Michael Natterer). --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ gtk/gtkfilechooserdefault.c | 5 +++++ 3 files changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index adbdabeb95..a57830c4de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-05-16 Kristian Rietveld + + * gtk/gtkfilechooserdefault.c + (show_and_select_paths_finished_loading): put the newly selected + row(s) the in the middle of the view, + (update_current_folder_get_info_cb), + (gtk_file_chooser_default_update_current_folder): make sure reload + state is set to RELOAD_HAS_FOLDER while loading the new folder, + so _map() won't start loading the current working directory. (Fixes + #341028, reported by Michael Natterer). + 2006-05-15 Matthias Clasen * gtk/gtktreeview.c (gtk_tree_view_button_press): Fix diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index adbdabeb95..a57830c4de 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2006-05-16 Kristian Rietveld + + * gtk/gtkfilechooserdefault.c + (show_and_select_paths_finished_loading): put the newly selected + row(s) the in the middle of the view, + (update_current_folder_get_info_cb), + (gtk_file_chooser_default_update_current_folder): make sure reload + state is set to RELOAD_HAS_FOLDER while loading the new folder, + so _map() won't start loading the current working directory. (Fixes + #341028, reported by Michael Natterer). + 2006-05-15 Matthias Clasen * gtk/gtktreeview.c (gtk_tree_view_button_press): Fix diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 79bd12e22b..d5b6119c8f 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -5768,6 +5768,8 @@ show_and_select_paths_finished_loading (GtkFileFolder *folder, select_func, data->impl); } + browse_files_center_selected_row (data->impl); + gtk_file_paths_free (data->paths); g_free (data); } @@ -6089,6 +6091,7 @@ update_current_folder_get_info_cb (GtkFileSystemHandle *handle, goto out; impl->update_current_folder_handle = NULL; + impl->reload_state = RELOAD_EMPTY; set_busy_cursor (impl, FALSE); @@ -6192,6 +6195,8 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser, data->path = gtk_file_path_copy (path); data->keep_trail = keep_trail; + impl->reload_state = RELOAD_HAS_FOLDER; + impl->update_current_folder_handle = gtk_file_system_get_info (impl->file_system, path, GTK_FILE_INFO_IS_FOLDER, update_current_folder_get_info_cb, -- 2.30.2